/**
 * Copyright (c) 2010, G&T Services Italy
 * All rights reserved.

 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 *  - Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *
 *  - Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 *  - Neither the name of G&T Services Italy nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *
 * @author Cristian Giustini
 * @category jQuery Scroll Plugin
 * @copyright Copyright (c) 2006-2010 G&T Services (http://www.gtservices-online.com
 * @description gtScroller allows you to perform an automatic slide simply providing an
 * unordered list (<ul>) and some css to style it a bit.
 * [NOTE]: gtScroller plugin doesn't do any kind of css modification, you need to do by yourself.
 *
 * @example $("ul#list").scroller({
 *    height: '200px',
 *    time: '1000'
 * });
 *
 */
(function($){$.fn.scroller=function(c){var d={height:'140px',time:'4000',animation:'slideDown',stopAnimationOnHover:false,backgroundColorOnHover:false};if(c){$.extend(d,c)}function prepareCss(a){$(a).css({'overflow':'hidden','height':d.height})}function startTimeout(b){tout=setTimeout(function(){var a=$(b).find("li:last");$(a).detach().prependTo(b).hide();if(d.animation=='fadeIn')$(a).fadeIn("slow");else if(d.animation=='show')$(a).show("slow");else $(a).slideDown("slow");startTimeout(b)},d.time)}function stopTimeout(){if(tout)clearTimeout(tout)}function changeBackgroundColor(b){$(b).find("li").each(function(){var a=$(this).css('background-color');$(this).mouseover(function(){$(this).stop().animate({backgroundColor:d.backgroundColorOnHover})}).mouseout(function(){$(this).stop().animate({backgroundColor:a})})})}return this.each(function(){var a=$(this);prepareCss(a);if(d.backgroundColorOnHover)changeBackgroundColor(a);if(d.stopAnimationOnHover){$(a).mouseover(function(){stopTimeout(a)}).mouseout(function(){startTimeout(a)})}startTimeout(a)})}})(jQuery);
